<style include="settings-shared"></style>
<template is="dom-if" if="[[showCrostiniContainerUpgrade_]]">
  <div id="container-upgrade" class="settings-box first">
    <iron-icon icon="cr:file-download"></iron-icon>
    <div class="middle settings-box-text" aria-hidden="true">
      <div id="containerUpgradeLabel">
        $i18n{crostiniContainerUpgrade}
      </div>
      <div class="secondary" id="containerUpgradeDescription">
        $i18n{crostiniContainerUpgradeSubtext}
      </div>
    </div>
    <cr-button id="containerUpgradeButton"
        on-click="onContainerUpgradeClick_"
        aria-labelledby="containerUpgradeLabel containerUpgradeButton"
        aria-describedby="containerUpgradeDescription"
        disabled="[[disableUpgradeButton_]]"
        deep-link-focus-id$="[[Setting.kCrostiniContainerUpgrade]]">
      $i18n{crostiniContainerUpgradeButton}
    </cr-button>
  </div>
</template>
<cr-link-row
    class="hr"
    id="crostini-shared-paths"
    label="$i18n{guestOsSharedPaths}"
    on-click="onSharedPathsClick_"
    role-description="$i18n{subpageArrowRoleDescription}">
</cr-link-row>
<cr-link-row
    class="hr"
    label="$i18n{guestOsSharedUsbDevicesLabel}"
    id="crostini-shared-usb-devices"
    on-click="onSharedUsbDevicesClick_"
    role-description="$i18n{subpageArrowRoleDescription}">
</cr-link-row>
<template is="dom-if" if="[[showCrostiniExtraContainers_]]">
  <cr-link-row
      class="hr"
      label="$i18n{crostiniExtraContainersLabel}"
      id="crostini-extra-containers"
      on-click="onExtraContainersClick_"
      role-description="$i18n{subpageArrowRoleDescription}">
  </cr-link-row>
</template>
<template is="dom-if" if="[[showCrostiniExportImport_]]">
  <cr-link-row
      class="hr"
      label="$i18n{crostiniExportImportTitle}"
      id="crostini-export-import"
      on-click="onExportImportClick_"
      role-description="$i18n{subpageArrowRoleDescription}">
  </cr-link-row>
</template>
<template is="dom-if" if="[[showArcAdbSideloading_]]">
  <cr-link-row
      class="hr"
      label="$i18n{crostiniArcAdbTitle}"
      id="crostini-enable-arc-adb"
      on-click="onEnableArcAdbClick_"
      role-description="$i18n{subpageArrowRoleDescription}">
  </cr-link-row>
</template>
<template is="dom-if" if="[[showCrostiniPortForwarding_]]">
  <cr-link-row
      class="hr"
      label="$i18n{crostiniPortForwarding}"
      id="crostini-port-forwarding"
      on-click="onPortForwardingClick_"
      role-description="$i18n{subpageArrowRoleDescription}">
  </cr-link-row>
</template>
<template is="dom-if" if="[[showCrostiniDiskResize_]]">
  <div class="settings-box hr" id="crostini-disk-resize">
    <div class="start">
      <div>
        $i18n{crostiniDiskResizeLabel}
      </div>
      <div class="secondary" id="diskSizeDescription">
        [[diskSizeLabel_]]
      </div>
    </div>
    <cr-button on-click="onDiskResizeClick_" hidden="[[!canDiskResize_]]"
        aria-label="[[diskResizeButtonAriaLabel_]]"
        aria-describedby="diskSizeDescription"
        id="showDiskResizeButton"
        deep-link-focus-id$="[[Setting.kCrostiniDiskResize]]">
      [[diskResizeButtonLabel_]]
    </cr-button>
  </div>
  <template is="dom-if" if="[[showDiskResizeDialog_]]" restamp>
    <settings-crostini-disk-resize-dialog
        on-close="onDiskResizeDialogClose_">
    </settings-crostini-disk-resize-dialog>
  </template>
  <template is="dom-if" if="[[showDiskResizeConfirmationDialog_]]" restamp>
    <settings-crostini-disk-resize-confirmation-dialog
        on-close="onDiskResizeConfirmationDialogClose_"
        on-cancel="onDiskResizeConfirmationDialogCancel_">
    </settings-crostini-disk-resize-confirmation-dialog>
  </template>
</template>
<settings-toggle-button
    class="hr"
    id="crostini-mic-permission-toggle"
    pref="{{prefs.crostini.mic_allowed}}"
    no-set-pref
    label="$i18n{crostiniMicTitle}"
    on-settings-boolean-control-change="onMicPermissionChange_"
    deep-link-focus-id$="[[Setting.kCrostiniMicAccess]]">
</settings-toggle-button>
<template is="dom-if" if="[[showCrostiniMicPermissionDialog_]]" restamp>
  <settings-crostini-confirmation-dialog
      id="crostini-mic-permission-dialog"
      accept-button-text="$i18n{crostiniMicDialogShutdownButton}"
      on-close="onCrostiniMicPermissionDialogClose_">
    <div slot="body">$i18n{crostiniMicDialogLabel}</div>
  </settings-crostini-confirmation-dialog>
</template>
<template is="dom-if" if="[[!hideCrostiniUninstall_]]">
  <div id="remove" class="settings-box">
    <div id="removeCrostiniLabel" class="start" aria-hidden="true">
      $i18n{crostiniRemove}
    </div>
    <cr-button on-click="onRemoveClick_"
        aria-label="$i18n{crostiniRemoveButton}"
        aria-describedby="removeCrostiniLabel"
        deep-link-focus-id$="[[Setting.kUninstallCrostini]]">
      $i18n{crostiniRemoveButton}
    </cr-button>
  </div>
</template>
